// import{GB2260} from "./identity.data";
export const GB2206 = [];
export const extractInfo = (idNo:string)=>{
    const addrPart = idNo.substring(0,6);
    const birthPart = idNo.substring(6,14);
    return {
        addrCode: addrPart,
        dateOfBirth: birthPart
    }
}
export const isValidAddr = (addr:string)=>{
    return GB2206[addr] !== undefined;
}
export const getAddrByCode = (code:string)=>{
    const province = GB2206[code.substring(0,2)+'0000'];
    const city = GB2206[code.substring(0,4)+'00'].replace(province,''); 
    const district = GB2206[code].replace(province+city,'');
    return {
        province:province,
        city:city,
        district:district,
    }
}